<?
require_once("../config/dbconn.php");require_once("../config/usercls.php");
$sqlqx="select rank from {$db_prefix}users where id='".$_SESSION['sys_userid']."'";
$rsqx=$db->get_one($sqlqx);
?>
<html>
<head>
<meta http-equiv=Content-Type content=text/html;charset=utf-8>
<title> 管理页面</title>
<link href="css/style01.css" rel="stylesheet" type="text/css" />
<script language=JavaScript>
function logout(){
	if (confirm("您确定要退出吗？"))
	top.location = "outsys.php";
	return false;
}
</script>
<script language=JavaScript1.2>
function showsubmenu(sid) {
	var whichEl = eval("submenu" + sid);
	var menuTitle = eval("menuTitle" + sid);
	if (whichEl.style.display == "none"){
		eval("submenu" + sid + ".style.display=\"\";");
	}else{
		eval("submenu" + sid + ".style.display=\"none\";");
	}
}

function showsubmenu(sid) {
	var whichEl = eval("submenu" + sid);
	var menuTitle = eval("menuTitle" + sid);
	if (whichEl.style.display == "none"){
		eval("submenu" + sid + ".style.display=\"\";");
	}else{
		eval("submenu" + sid + ".style.display=\"none\";");
	}
}
</script>


<script language="JavaScript" src="js/jquery.js"></script>
<script type="text/javascript">
$(function(){	
	//顶部导航切换
	$(".nav li a").click(function(){
		$(".nav li a.selected").removeClass("selected")
		$(this).addClass("selected");
	})	
})	
</script>


<script language="javascript">function getCurDate(){ var d = new Date(); var week; switch (d.getDay()){ case 1: week="星期一"; break; case 2: week="星期二"; break; case 3: week="星期三"; break; case 4: week="星期四"; break; case 5: week="星期五"; break; case 6: week="星期六"; break; default: week="星期天"; } var years = d.getYear(); var month = add_zero(d.getMonth()+1); var days = add_zero(d.getDate()); var hours = add_zero(d.getHours()); var minutes = add_zero(d.getMinutes()); var seconds=add_zero(d.getSeconds()); var ndate = years+"年"+month+"月"+days+"日 "+hours+":"+minutes+":"+seconds+" "+week; divT.innerHTML= ndate;}function add_zero(temp){ if(temp<10) return "0"+temp; else return temp;}setInterval("getCurDate()",100);</script>


            
            
            

</head>
<base target="main">

<body style="background:url(images/topbg.gif) repeat-x;">

    <div class="topleft">
    	<a href="index.php" target="_parent"></a>
    </div>
    <div class="topright">    
    <ul>
    	<li id="localtime"></li>
        <script type="text/javascript">
			function showLocale(objD)
			{
				var str,colorhead,colorfoot;
				var yy = objD.getYear();
				if(yy<1900) yy = yy+1900;
				var MM = objD.getMonth()+1;
				if(MM<10) MM = '0' + MM;
				var dd = objD.getDate();
				if(dd<10) dd = '0' + dd;
				var hh = objD.getHours();
				if(hh<10) hh = '0' + hh;
				var mm = objD.getMinutes();
				if(mm<10) mm = '0' + mm;
				var ss = objD.getSeconds();
				if(ss<10) ss = '0' + ss;
				var ww = objD.getDay();
				if  ( ww==0 )  colorhead="<font color=\"#FF0000\">";
				if  ( ww > 0 && ww < 6 )  colorhead="<font color=\"#D9E4E4\">";
				if  ( ww==6 )  colorhead="<font color=\"#008000\">";
				if  (ww==0)  ww="星期日";
				if  (ww==1)  ww="星期一";
				if  (ww==2)  ww="星期二";
				if  (ww==3)  ww="星期三";
				if  (ww==4)  ww="星期四";
				if  (ww==5)  ww="星期五";
				if  (ww==6)  ww="星期六";
				colorfoot="</font>"
				str = colorhead + yy + "-" + MM + "-" + dd + " " + hh + ":" + mm + ":" + ss + "  " + ww + colorfoot;
				return(str);
			}
			function tick()
			{
				var today;
				today = new Date();
				document.getElementById("localtime").innerHTML = showLocale(today);
				window.setTimeout("tick()", 1000);
			}
			tick();
			</script>
        <li><a href="#" target="_self" onClick="logout();">退出</a></li>
    </ul>
    <?
	$sql="select * from {$db_prefix}users where id='".$_SESSION['sys_userid']."'";
	$rs=$db->get_one($sql);
	?> 
    <div class="user">
    <span><?=$rs['username']?></span>
    <i></i>
    <!--<b></b>-->
    </div>    
    <?
		$SQLQQ="select * from {$db_prefix}qqkf where 1";
		$RESULTQQ=$db->query($SQLQQ);
		while($rsqq=$db->fetch_array($RESULTQQ)){
		?>
<a href=' http://wpa.qq.com/msgrd?V=1&amp;Uin=<?=$rsqq['qq']?>&amp;Site=&amp;Menu=yes' target='_blank'><img src=' http://wpa.qq.com/pa?p=1:<?=$rsqq['qq']?>:4'  border='0' alt='QQ' /><?=$rsqq['kfname']?></a> 
<?
		}
		$db->free_result($RESULTQQ);
		?>
    </div>

</body>
</html>
